package com.oompu.cARd;

import android.net.Uri;
import android.os.Bundle;

import com.jeremyfeinstein.slidingmenu.lib.SlidingMenu;
import com.oompu.cARd.CenterFragment.OnCenterFragmentInteractionListener;
import com.oompu.cARd.LeftFragment.OnLeftFragmentInteractionListener;
import com.oompu.cARd.RightFragment.OnRightFragmentInteractionListener;

public class LeftAndRightActivity extends BaseActivity implements OnCenterFragmentInteractionListener, OnLeftFragmentInteractionListener, OnRightFragmentInteractionListener{

	public LeftAndRightActivity() {
		super(R.string.app_name);
	}

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		
		getSlidingMenu().setMenu(R.layout.menu_frame);
		getSlidingMenu().setShadowDrawable(R.drawable.shadowright);
		getSupportFragmentManager()
		.beginTransaction()
		.replace(R.id.menu_frame, new LeftFragment())
		.commit();
		
		getSlidingMenu().setSecondaryMenu(R.layout.menu_frame_two);
		getSlidingMenu().setSecondaryShadowDrawable(R.drawable.shadowright);
		getSupportFragmentManager()
		.beginTransaction()
		.replace(R.id.menu_frame_two, new RightFragment())
		.commit();

		getSlidingMenu().setMode(SlidingMenu.LEFT_RIGHT);
		getSlidingMenu().setTouchModeAbove(SlidingMenu.TOUCHMODE_FULLSCREEN);
		setContentView(R.layout.content_frame);
		getSupportFragmentManager()
		.beginTransaction()
		.replace(R.id.content_frame, new CenterFragment())
		.commit();
		
	}

	@Override
	public void onFragmentInteraction(Uri uri) {
		// TODO Auto-generated method stub
		
	}


}
